<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <title>个人中心</title>
    <div th:replace="commonPage::comLink"></div>
    <style>
        /*背景层*/
        #popLayer {
            display: none;
            background-color: #B3B3B3;
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            z-index: 10;
            -moz-opacity: 0.8;
            opacity: .80;
            filter: alpha(opacity=80); /* 只支持IE6、7、8、9 */
        }

        /*弹出层*/
        #popBox {
            display: none;
            background-color: #FFFFFF;
            z-index: 11;
            width: 200px;
            height: 200px;
            position: fixed;
            top: 0;
            right: 0;
            left: 0;
            bottom: 0;
            margin: auto;
        }

        #popBox .close {
            text-align: right;
            margin-right: 5px;
            background-color: #F8F8F8;
        }

        /*关闭按钮*/
        #popBox .close a {
            text-decoration: none;
            color: #2D2C3B;
        }

    </style>
</head>
<body>
<div th:replace="commonPage::#loader"></div>
<div th:replace="commonPage::comIndexHeaderMune"></div>


<section class="contact-area padding-top-140px padding-bottom-120px">
    <div class="left-list">
        <ul class="nav nav-pills">
            <li role="presentation" class="user-center"><a href="#my_info">个人信息</a></li>
            <li role="presentation" class="user-center"><a href="#my_questions">我的问题</a></li>
            <li role="presentation" class="user-center"><a href="#doctor_prove">医生认证</a></li>
        </ul>
    </div>

    <div class="container">
        <div class="row">
            <div class="col-lg-7 mx-auto">
                <ul class="nav nav-pills">
                    <li role="presentation" class="active"><a href="#">个人中心</a></li>
                    <li role="presentation" class="user-center"><a th:href="@{/userCenter/notices}">通 知</a></li>
                    <li role="presentation" class="user-center"><a th:href="@{/userCenter/communicate}">私 信</a></li>
                </ul>

                <br>
                <div id="my_info" class="user-form">
                    <div class="text-center">
                        <h3>个人信息</h3>
                    </div>
                    <form th:action="@{/updateInfo}" method="post" enctype="multipart/form-data">
                        <div class="form-group">
                            <label for="userName">用户ID</label>
                            <input type="text" class="form-control" name="userName" id="userName"
                                   th:value="${session.loginUser.userName}" readonly="readonly">
                        </div>
                        <div class="form-group">
                            <label for="userName">用户昵称</label>
                            <input type="text" class="form-control" name="name" id="name"
                                   th:value="${session.loginUser.name}">
                        </div>
                        <div class="form-group">
                            <label for="gender">性别</label>
                            <input class="form-control" name="gender" id="gender"
                                   th:value="${session.loginUser.gender}=='man'?'男':'女'"
                                   readonly="readonly">
                        </div>
                        <div class="form-group">
                            <label for="fullName">真实姓名</label>
                            <input type="text" class="form-control" name="fullName" id="fullName"
                                   th:value="${session.loginUser.fullName}" readonly="readonly">
                        </div>
                        <div class="form-group">
                            <label for="telephone">电话</label>
                            <input type="text" class="form-control" name="telephone" id="telephone"
                                   th:value="${session.loginUser.telephone}">
                        </div>
                        <div class="form-group">
                            <label for="email">邮箱</label>
                            <input type="text" class="form-control" name="email" id="email"
                                   th:value="${session.loginUser.email}">
                        </div>


                        <div class="form-group">
                            <!--                    <div class="form-group">&ndash;&gt;-->
                            <label for="city">所在城市</label>
                            <br>
                            <input type="text" class="form-control col-sm-5" name="city" id="city"
                                   th:value="${session.loginUser.city}" readonly="readonly">
                            <span class="btn-right title-notice" onclick="changeCity()">修改所在城市</span>
                        </div>

                        <div id="modifyCity" class="reply-hidden">
                            <br>
                            <input id="changeCity" name="changeCity" value="" class="hidden">
                        </div>
                        <script type="text/javascript" src="http://lib.h-ui.net/jquery/1.9.1/jquery.min.js"></script>
                        <script type="text/javascript">
                            /*调用插件*/
                            $(function () {
                                $("#modifyCity").ProvinceCity();
                            });
                        </script>
                        <br>
                        <div class="form-group">
                            <label for="imgUrl">修改头像</label>
                            <input type="file" id="imgUrl" name="imgUrl">
                        </div>
                        <button type="submit" class="btn btn-info btn-primary btn-right">修改</button>
                    </form>
                </div>


<!--                我的问题-->
                <br style="line-height: 100px">
                <div class="user-form" id="my_questions">
                    <div class="text-center">
                        <h3>我发布的问题</h3>
                    </div>
                    <hr>
                    <div th:if="${myQuestions.isEmpty()}">
                        <p> 您还没有发布问题哦！</p>
                    </div>
                    <div th:each="question : ${myQuestions}">
                        <span class="btn-right"
                              th:text="${#dates.format(question.gmtCreate,'yyyy-MM-dd HH:mm')}"></span>

                        <br>
                        <a th:href="'/question/' +${question.id}"
                           class="title-questions">
                            <b>
                                [[${question.title}]]
                            </b>
                        </a>
                        <a th:href="@{'/delete/question/'+${question.id}}"
                           onclick="return confirmDeleteQuestion()" class="btn-right">
                            <i class="fa fa-trash-o fa-lg icon-delete">
                            </i></a>
                        <hr>
                    </div>
                </div>

                <br style="line-height: 100px">
                <div class="user-form" id="doctor_prove">
                    <div class="text-center">
                        <h3>医生认证</h3>
                    </div>
                    <hr>
                    <div>
                    <font color="red"> * </font> 您可以在此处认证成为一名医生
                    <br><br>
                    <font color="red"> * </font> 您需要上传您的行医资格证
                    <br><br>
                    <font color="red"> * </font> 您需要上传您的身份证正反面
                    <br><br>
                    <font color="red"> * </font> 您的信息将由工作人员审核，并在1~3个工作日内完成审核
                        <br><br>
                    </div>
                    <div th:if="${session.loginUser.job}!=2">
                    ☆ 点击认证：
                    <input type="button" name="popBox"  value="身份认证" onclick="popBox()">
                    <div id="popLayer"></div>
                    <div id="popBox">
                        <div class="close">
                            <a href="javascript:void(0)" onclick="closeBox()">关闭</a>
                        </div>
                        <div class="content">
                            这是弹出层
                        </div>
                    </div>
                </div>
                    <div th:if="${session.loginUser.job}==2">
                        <hr>
                        <font color="red"> * </font>您已认证成功！
                    </div>
                </div>
            </div>
        </div><!-- end breadcrumb-content -->
    </div><!-- end col-lg-12 -->
</section><!-- end breadcrumb-area -->
<!-- ================================
    END BREADCRUMB AREA
================================= -->


<div th:replace="commonPage::comFooter">
</div>
<div th:replace="commonPage::comScript">
</div>

</body>
</html>